Call:
lm(formula = sqrt(co2) ~ mean_income, data = mhi_CO2)
Residuals:
Min 1Q Median 3Q Max
-9.8285 -0.6494 -0.2516 0.4639 8.6894
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.085e-01 1.065e-02 85.34 <2e-16 ***
mean_income 1.402e-04 1.466e-06 95.59 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1 on 13384 degrees of freedom
Multiple R-squared: 0.4057, Adjusted R-squared: 0.4057
F-statistic: 9138 on 1 and 13384 DF, p-value: < 2.2e-16
LinearRegression
1 Setup
2 Data
3 Data Visualization
Double clicking a country will select that country and deselect all of the other countries. Single clicking any other country will re-add that country to the plot. Double clicking any selected country will re-add all the countries to the plot.
The two plots shown are interactive plots of Carbon Dioxide Produced per Person vs. Mean Household Income and Carbon Dioxide Produced per Person by Mean Household Income per Year, respectively. The first plot shows Mean Household Income on the x-axis and metric tonnes of Carbon Dioxide produced per person on the y-axis. This plot shows how increasing income affects the amount of CO2 produced per person. The second plot shows the change in graph one over time, from 1950 to 2018. This plot shows how the ratio of CO2 produced over mean household income has changed over the last 68 years.
4 Linear Regression
Linear regression involves modeling the relationship between variables in a dataset in a scalar way. A linear model in the form yi = β0 + β1xi + ε is used to describe the relationship between each explanatory variable to the response accounting for random error. In this study, mean income is the explanatory variable and predicted co2 level is the response, so the model attempts to explain how changes in mean income increase or decrease predicted(co2) levels.
\(Predicted(co2) = 1.163 + .0006679(mean income)\)
For every one unit increase in mean income(measured in standardized international dollar units), we expect a .0006679 increase in co2 emission levels(measured in metric tons), or 1.47 lb increase.
Our model has an r value of .578, which shows a moderate, positive linear relationship between yearly CO2 emissions and mean household income. Our R^2 value(.3341) shows that household income only accounts for 33.41% of variation in CO2 emissions. This is not very strong, and we would want to look to manipulate our current variables or add more explanatory variables to make our model stronger.
5 Model Fit
| Datasets | Variance |
|---|---|
| Response Variable | 46.5165847 |
| Model Fitted Values | 0.6831857 |
| Model Residuals | 1.0006039 |
The proportion of variability in the response values account for by the regression model is calculated using R-squared with a formula of (R2 = 1 - (residual variance / variance in response value)).
R2 = 1 - (32.72974 / 48.69698) = 0.327 or 32.7%.
Since our R2 is only around 33% this suggest that the quality of our model is pretty weak and would most likely be improved by increasing the number of explanatory variables.
[1] 1000
[1] 13386